home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
tagsgen.exe
/
TAGS.DOC
< prev
next >
Wrap
Text File
|
1992-03-29
|
34KB
|
858 lines
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒┌ ┐▒
▒ Tags Generator V1.7 ▒
▒ ▒
▒ A TAGS generator for Assembly and C and written in C ▒
▒ V1.7 Dedicated to the Public Domain ▒
▒ ▒
▒ March 29, 1992 ▒
▒ J. Kercheval ▒
▒ [72450,3702] -- johnk@wrq.com ▒
▒└ ┘▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
03-30-92
This is V1.7
Fixed a number of C parsing bugs, including a problem with the C++
extern "C" {...} statement and a number of small annoyances with
preprocessor directives again.
Support was added for V6.0 of Epsilon for the new tag file format. The
previous format is available via the -o5 output switch. In addition,
the first line (the tag header) of the output tag file specified via the
-t switch is dealt with correctly (while using the -oe switch).
jbk
11-12-91
This is V1.6
Added a junk filter for the C parser to eradicate unwanted tokens
which were normally delimiters but were being tagged due to syntactic
nuisances introduced through the twisted use of preprocessor
directives and 'soft' syntax errors such as a ';' at the end of a
procedure. Added the -? switch as a common synonym for -h.
jbk
10/07/91
This is V1.5
The moment you post something, you (or normally, someone else) finds
a bug to let you know what a peon you really are. V1.4 had problems
with extended enumeration constants and syntactic vagaries regarding
enum declarations.
jbk
10/04/91
This is V1.4
A bug was fixed in assembly tagging (local labels using ':' were
being tagged when defines were enabled regardless of -al flag).
Exclude file parsing (-x flag) was added. Support for tagging of
enumeration constants and internal static declarations (-ck -ci) was
added. Improved support of LISTFILES, now the list file may be in
the form of a response file and filenames may be separated by '+',
',', ';' or whitespace (comments delimited by '#' are still
supported).
jbk
10/01/91
This is V1.3
A bug was fixed in cleanup code executed on Ctrl-C, Break, file
error, or memory allocation error. In V1.2, one of these errors
normally resulted in some lost chains in the file structure but only
manifested on a failure condition.
jbk
9/30/91
This is V1.2
This code is dedicated to the Public Domain, this means you may use
this code for any purpose and for any reason and without any
warranty, suitability to task, etc. Public Domain also means that
you may not place your own Copyright on this code. Do not claim it
to be your work. Portions of this are under GNU CopyLeft (read the
GNU.DOC file included in this distribution). In particular the sort
module (sort.c std.h) are under both GNU CopyLeft and individual
Copyright. If you need to be rid of CopyLeft to use this utility you
will have to roll your own (or obtain another public domain) sort
engine.
If you do use this and then make changes, bug fixes, or better still,
add a new language parser (PASCAL, FORTRAN, BASIC come to mind right
off the top) or create a macro for a particular editor to deal with
tag files, then please route these changes to me and I will
incorporate these changes and repost the package.
The intent of this utility and the release of its source to the
Public Domain is in the interest of high quality programming and code
generation. Quality is designed in at the earliest stages and must
be maintained by the use of high quality development and maintenance
tools. If professionals doing good work devote some talent and time
to projects such as this and other projects then the programming
community as a whole benefits (enough evangelism).
jbk
------------------------------------------------------------------------------
Authors:
J. Kercheval
johnk@wrq.com
[72450,3702]
Overview and Architecture
C Module:
ASM Module:
Shell:
Arglist:
*IX wildcard:
Match:
Flags:
Tag IO (Format, styles and merge):
Modifications to Sort module to allow use as separate module
and some subtle bug fixes. Context diff in SORTMISC.ZIP
Epsilon extensions:
Mike Haertel
Free Software Foundation
Original Sort Module:
Kevin Dean
Fairview Mall P.O. Box 55074
1800 Sheppard Avenue East
Willowdale, Ontario
CANADA M2J 5B9
CRC Validation Module:
Contributors:
Leonid Kokin
leok@wrq.com
Brief macro:
Thanks:
Shane Hartman
ksh@ai.mit.edu
Eric Halpern
erich@wrq.com
Tad Marshall
tad@wrq.com
Beta testing and usability editing for distribution
------------------------------------------------------------------------------
Program Description:
This utility implements a tags generator for assembly and C code.
This module has been written for and is designed around the 80x86
platform but is written with platform specific code as isolated as
possible.
Tags are informative lines stored (usually) within an ascii file
and specify three things. First a tag contains a token or an
identifier which is a definition or declaration within the source
code, second a tag contains the file name where that particular token
is defined and third a typical tag will have an offset into the file
where the token is defined (for example a character offset or a line
number). Occasionally a tag will be generated for an environment
which likes the actual line which is the definition (GNU Emacs and
Epsilon for example) specified instead of a file offset. This type of
tag is sometimes used and is supported by this generator since, while
it is possible for more than one line in a file to be the same and be
VERY different in context, it has an advantage in that if your source
module changes, the tag will probably still be found.
The resulting tag file is intended to be used by an extensible
editor or browser to traverse (possibly) widely placed code during
planning, creation, maintenance and modification of medium and large
projects.
The tags file is used as an index into source definitions. The
typical implementation allows the user to place the cursor on the
token to be found, start a macro (usually bound to a key) and have
the editor place the cursor at the location which that token is
defined. This makes code traversal very simple. If in addition, the
macro implements a history, then moving around code becomes very
similar to using a hypertext system.
This generator has been designed to be used within a project make
file and has a large number of options designed to make the task of
generating and maintaining a tags file as simple and fast as
possible. There are three good methods for generating tags out of a
makefile and each method is best for particular situations. The
examples below use OPUS make scripts as makefile code samples.
1) The first method is to generate a new tag file every time the
executable is generated. This method is the simplest to
implement and is good for small and very small projects.
This would be accomplished with either a list file or a macro
within the makefile. Fo